<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>PHP 7.3.x 中废弃的功能</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="migration73.incompatible.html">« 不向下兼容的变更</a></li>
      <li style="float: right;"><a href="migration73.other-changes.html">其它变更 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="migration73.html">从 PHP 7.2.x 移植到 PHP 7.3.x</a></li>
    <li>PHP 7.3.x 中废弃的功能</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="migration73.deprecated" class="sect1">
 <h2 class="title">PHP 7.3.x 中废弃的功能</h2>

 <div class="sect2" id="migration73.deprecated.core">
  <h3 class="title">PHP 核心中废弃的功能</h3>

  <div class="sect3" id="migration73.deprecated.core.ci-constant">
   <h4 class="title">大小写不敏感的常量</h4>

   <p class="para">
    大小写不敏感的常量声明现已被废弃。将 <strong><code>true</code></strong> 作为第三个参数传递给 <span class="function"><a href="function.define.html" class="function">define()</a></span>
    将会导致一个废弃警告。大小写不敏感的使用（在读取时使用一个与声明时不同的大小写方式）也已被废弃。
   </p>
  </div>

  <div class="sect3" id="migration73.deprecated.core.assert">
   <h4 class="title">命名空间中的 assert()</h4>

   <p class="para">
    废弃：在一个命名空间中声明一个名为 <code class="literal">assert()</code> 的函数。
    <span class="function"><a href="function.assert.html" class="function">assert()</a></span> 函数属于引擎特殊处理的情况，当在命名空间中使用相同名字去定义
    函数时也许会导致不一致的行为。
   </p>
  </div>

  <div class="sect3" id="migration73.deprecated.core.string-search">
   <h4 class="title">在字符串中搜索非字符串内容</h4>

   <p class="para">
    废弃：将一个非字符串内容传递给字符串搜索函数。
    在将来所有待搜索的内容都将被视为字符串，而不是 ASCII 编码值。如果需要依赖这个特性，你应该
    要么显示地进行类型转换（转为字符串），或者显示地调用 <span class="function"><a href="function.chr.html" class="function">chr()</a></span>。
    以下是受到影响的方法：
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.strpos.html" class="function">strpos()</a></span></span>
     </li>
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.strrpos.html" class="function">strrpos()</a></span></span>
     </li>
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.stripos.html" class="function">stripos()</a></span></span>
     </li>
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.strripos.html" class="function">strripos()</a></span></span>
     </li>
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.strstr.html" class="function">strstr()</a></span></span>
     </li>
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.strchr.html" class="function">strchr()</a></span></span>
     </li>
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.strrchr.html" class="function">strrchr()</a></span></span>
     </li>
     <li class="listitem">
      <span class="simpara"><span class="function"><a href="function.stristr.html" class="function">stristr()</a></span></span>
     </li>
    </ul>
   </p>
  </div>

  <div class="sect3" id="migration73.deprecated.core.strip-tags-streaming">
   <h4 class="title">Strip-Tags Streaming</h4>

   <p class="para">
    <span class="function"><a href="function.fgetss.html" class="function">fgetss()</a></span> 函数和 <a href="filters.string.html" class="link">
    string.strip_tags stream filter</a> 已经被废弃。这同样影响了
    <span class="methodname"><a href="splfileobject.fgetss.html" class="methodname">SplFileObject::fgetss()</a></span> 方法和 
    <span class="function"><a href="function.gzgetss.html" class="function">gzgetss()</a></span> 函数。
   </p>
  </div>

 </div>

 <div class="sect2" id="migration73.deprecated.filter">
  <h3 class="title">Data Filtering</h3>

  <p class="para">
   对于 <strong><code>FILTER_FLAG_SCHEME_REQUIRED</code></strong> 和
   <strong><code>FILTER_FLAG_HOST_REQUIRED</code></strong> 常量的显示使用已被废弃。
   总之，<strong><code>FILTER_VALIDATE_URL</code></strong> 已经隐含了这两者。
  </p>
 </div>

 <div class="sect2" id="migration73.deprecated.image">
  <h3 class="title">图像处理和 GD 库</h3>

  <p class="para">
   <span class="function"><a href="function.image2wbmp.html" class="function">image2wbmp()</a></span> 已被废弃。
  </p>
 </div>

 <div class="sect2" id="migration72.deprecated.intl">
  <h3 class="title">国际化相关函数</h3>

  <p class="para">
   如果 PHP 关联的ICU  ≥ 56, 那么 <strong><code>Normalizer::NONE</code></strong>
   形式的使用将会导致抛出一个废弃警告。
  </p>
 </div>

 <div class="sect2" id="migration73.deprecated.mbstring">
  <h3 class="title">多字节字符串</h3>

  <p class="para">
   以下在文档中不存在的 <code class="literal">mbereg_*()</code> 别名已被废弃。请使用相应的
   <code class="literal">mb_ereg_*()</code> 变体替代。
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbregex_encoding()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mberegi()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_replace()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mberegi_replace()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbsplit()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_match()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_search()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_search_pos()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_search_regs()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_search_init()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_search_getregs()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_search_getpos()</strong></span></span> 
    </li>
    <li class="listitem">
     <span class="simpara"><span class="function"><strong>mbereg_search_setpos()</strong></span></span> 
    </li>
   </ul>
  </p>
 </div>

 <div class="sect2" id="migration73.deprecated.pdo-odbc">
  <h3 class="title">ODBC 和 DB2 函数 (PDO_ODBC)</h3>

  <p class="para">
   <a href="ref.pdo-odbc.html#ini.pdo-odbc.db2-instance-name" class="link">pdo_odbc.db2_instance_name</a>
   ini 设置项在先前已被废弃。 它在文档中自 PHP 5.1.1 起被废弃
  </p>
 </div>

</div></div></div></body></html>